﻿@using LView.CMS.Models;
@{
    ViewData["Title"] = "试卷管理";
}

<form class="layui-form layui-form-pane" style="width:100%;">
    @Html.AntiForgeryToken()
    @Html.Hidden("Id")
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">试卷名称</label>
        <div class="layui-input-block">
            <input type="text" name="TestPageName" class="layui-input TestPageName" lay-verify="TestPageName" placeholder="请输入试卷名称">
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">限时(分钟)</label>
        <div class="layui-input-block">
            <input type="text" name="LimitTime" class="layui-input LimitTime" placeholder="请输入限时时间" lay-verify="LimitTime" autocomplete="off" />
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">限考次数</label>
        <div class="layui-input-block">
            <input type="text" name="LimitCount" class="layui-input LimitCount" placeholder="请输入限考次数" lay-verify="LimitCount" autocomplete="off" />
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">试卷总分</label>
        <div class="layui-input-block">
            <input type="text" name="TotalScore" class="layui-input TotalScore" placeholder="请输入试卷总分" lay-verify="TotalScore" autocomplete="off" />
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">合格分数</label>
        <div class="layui-input-block">
            <input type="text" name="PassScore" class="layui-input PassScore" placeholder="请输入合格分数" lay-verify="PassScore" autocomplete="off" />
        </div>
    </div>

    <label class="layui-btn addOneQuestion" id="addOneQuestion1">添加一题</label>

    <hr>
    <div id="divQuestion">
        <label>第1题</label>
        <blockquote class="layui-elem-quote quoteBox">
            <div class="layui-box layui-row">
                <label class="layui-form-label">问题类型</label>
                <div class="layui-input-block">
                    <input type="radio" name="QuestionType1" value="0" lay-filter="QuestionType1Filter" title="单选题" checked>
                    <input type="radio" name="QuestionType1" value="1" lay-filter="QuestionType1Filter" title="多选题">
                    <input type="radio" name="QuestionType1" value="2" lay-filter="QuestionType1Filter" title="判断题">
                </div>

            </div>
            <div class="layui-box layui-row">
                <label class="layui-form-label">题目</label>
                <div class="layui-input-block">
                    <input type="text" name="Question" id="Question1" class="layui-input Question" placeholder="请输入题目" lay-verify="required|Question" autocomplete="off" />
                </div>
            </div>
            <div class="layui-box layui-row">
                <label class="layui-form-label">本题分数</label>
                <div class="layui-input-block">
                    <input type="text" name="QuestionScore" id="QuestionScore1" class="layui-input Question" placeholder="请输入本题分数（数字）" lay-verify="required|QuestionScore" autocomplete="off" />
                </div>
            </div>
            @*<div class="layui-box layui-row">
                    <label class="layui-form-label">选项</label>
                    <div class="layui-input-block">
                        <input type="text" name="Option" class="layui-input Option" placeholder="请输入选项" lay-verify="Option" autocomplete="off" />
                    </div>
                </div>*@
            <div class="layui-box layui-row">
                <label class="layui-form-label addOneQuestionOption">添加选项</label>
                <div class="layui-input-block questionOptions">
                    <input type="text" name="Option1" class="layui-input Option1" placeholder="请输入选项" lay-verify="required|Option" autocomplete="off" />
                </div>
            </div>
            <div class="layui-box layui-row answerDiv">
                <label class="layui-form-label">本题答案</label>
                <div class="layui-input-block questionAnswers">
                    <input type="radio" data-check="false" name="answer1-1" value="1" lay-filter="answerFilter" title="1">
                    @*<input type="text" name="Option" id="Answer1" class="layui-input answer" placeholder="请输入答案，按选项单元格顺序，自1起始，如1/2/3/4" lay-verify="required|Option" autocomplete="off" />*@
                </div>
            </div>
        </blockquote>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <div class="layui-input-block">
            <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="addTestPage">确定</button>
            <button type="reset" class="layui-btn layui-btn-sm layui-btn-primary">重置</button>
        </div>
    </div>
</form>
@section Scripts{
    <script type="text/javascript" src="~/layui/layui.js"></script>
    <script type="text/javascript" src="~/js/TestPage/TestPageAdd.js?_=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
}
